home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 029a / sclip.zip / SCLPRG.FW3 (.txt) < prev    next >
FrameworkDocument  |  1990-07-23  |  62KB  |  1,170 lines

  1. ; Scan & Clip  
  2.     ; by Gary Reger
  3.         ;VERSION 
  4. 90-07-23
  5. ;                    (c) copyright claimed
  6. ;..........................................
  7. HOMEG :=@setselection,
  8. F:=0,
  9. @disp,
  10. @Scan Menu
  11. sclprg;{Alt-S}; Scan & Clip version 
  12. Start-up program modules
  13. ; test for certain common location errors
  14. @echo(#off),
  15. @local(ftt),
  16. ftt:=@frametype,
  17.     ;batch started inside formula
  18. @if(@and(ftt=15,BATX="Y"),
  19.     @list(                  ;formula
  20.         @beep,
  21.         @beep,
  22.         @inputline("Batch? is on. Cannot start batch inside formula; {return} to abort."),
  23.         @return(0))),
  24.     ; started inside disk cabinet, but disk batch off
  25. @if(@and(ftt=1,@or(BATX="N",@and(BATX="Y",BATT="FW"))),
  26.     @list(                  
  27.         @beep,
  28.         @beep,
  29.         @inputline(" Cannot start inside disk cabinet with current settings; {return} to abort."),
  30.         @return(0))),
  31. ;display current key settings, if allowed by starting conditions
  32.     @list(@if(@and(ftt<>15,ftt<>1,Display Key Settings="Y"),@list(
  33.         @setselection("scldisp"),
  34.         @pk("{f9}{return}
  35. Current settings for key toggles
  36.  :{return}"),
  37.         @pk("{return}Multi-Frame Batch?  --  " &BATX &"{return}"),
  38.         @pk("{return}Type of Multi-Frame Batch?  --  " &BATT &"{return}"), 
  39.         @pk("{return}Skip outline type prompt?  --  " &OTX &"{return}"),
  40.         @pk("{return}Outline type?  --  " &OTT &"{return}"),
  41.         @pk("{return}Prompt for context block size?  --  " &BSPX &"{return}"),
  42.         @pk("{return}Size of Context Block?  --  " &BSPN &"{return}"),
  43.         @pk("{return}Skip close proximity hits?  --  " &BPX &"{return}"),
  44.         @pk("{return}Proximity to skip?  --  " &BPN &"{return}"),
  45.         @pk("{ctrl-home}{f9}"),
  46.         @pk("{ctrl-out}{return}{scroll-lock}"),
  47.         @display(scldisp),
  48.         @echo(#on))))
  49. @local(ftt),
  50. ftt:=@frametype,
  51. @if(@and(ftt<>15,ftt<>1,Display Key Settings="Y"),@display(Scldisp)),
  52. @menu(Scan Menu)
  53. ,ftt<>1,Displ
  54. Scan Menu
  55. #FALSE
  56. @quitmenu,
  57. OTS :="N",
  58. @scanrun
  59. #TBD!
  60. @Setup menu
  61. Change or view Setup
  62. #TBD!
  63. @quitmenu
  64. #FALSE
  65. F:=1,
  66. @setsearch,
  67. @setblock,
  68. @IF(BATX<>"y",@selecttype),
  69. @if(@and(BATX="Y",BATT="D"),@list(
  70.                 @Disk Batch,
  71.              @echo(#on),
  72.              @eraseprompt,
  73.              @prompt(" Batch scan is completed."))),
  74. @if(@and(BATX="Y", BATT="FW"),@list(
  75.                 @Desktop Batch,
  76.              @echo(#on),
  77.                 @eraseprompt,
  78.                 @prompt(" Batch scan is completed.")))
  79. Scanrun
  80. @Diskbstart
  81. Disk Batch
  82. #TRUE
  83. ;set location in drive
  84. fb:=@panel1,
  85. fe:=@panel2,
  86. FA:=fe-fb,
  87. batk:=0,
  88. @diskbloop
  89. anel2,
  90. Diskbstart
  91. #TRUE
  92. @diskblfirst,
  93. ;=====================
  94. ; begin master disk batch loop
  95. @while(fc<=FA,
  96.     @selecttype,
  97.     ;return from scanclip SUB-loop
  98. @memavail,
  99. @diskbnextf,
  100.     @memavail,
  101.     @echo(#on),
  102.     @echo(#off)),
  103. @delete(HOMEBAT)
  104. #off)),
  105. Diskbloop
  106. ;LOAD FIRST
  107. @eraseprompt,
  108. @prompt(" Getting and preparing to scan Frame #1."),
  109. @pk("{return}{ESC}{END}"),
  110. HOMEBAT :=@setselection,
  111. HOMEG:=HOMEBAT,
  112. FC:=0,
  113. fn:=fe-@panel1
  114. ction,
  115. Diskblfirst
  116. #FALSE
  117. @if(fc+1<=FA, @list(
  118.                 @eraseprompt,
  119.                 batk :=batk+1,
  120.                 @beep(1000,10),
  121.                 @prompt(" Finished with Frame #" &@business(batk,0) &" in batch. Getting Frame #" &@business(batk+1,0) & "."))),
  122.     ;select next frame
  123.     @pk("{ctrl-out}"),
  124. @echo(#on,2),
  125. @echo(#off),
  126.     @if(BATP="Y",@list(@pk("{CTRL-P}b"),@beep(0,10))),
  127.     @pk("{uparrow}"),
  128.     @delete(HOMEBAT),
  129.     @pk("{scroll-lock}"),
  130.     @memavail,
  131.     fc:=fc+1,
  132.        @PK("{dnarrow}"),
  133.     @pk("{return}"),
  134.     HOMEBAT :=@setselection,
  135.     HOMEG:=HOMEBAT,
  136. @if(fc<=FA, @list(
  137.                 @eraseprompt,
  138.                 @beep(1000,10),
  139.                 @prompt(" Now preparing to scan Frame #" &@business(batk+1,0) & "."),
  140.                 @beep(0,80)))
  141. Diskbnextf
  142. @deskbstart
  143. Desktop Batch
  144. #FALSE
  145. fn:=0,
  146. HOMEBAT:=@setselection,
  147. HOMEG:=HOMEBAT,
  148. fb:=@panel1,
  149. fe:=@panel2,
  150. FA:=fe-fb,
  151. fc:=1,
  152. batk :=0,
  153. @deskbloop
  154. FA:=fe-fb
  155. Deskbstart
  156. #FALSE
  157. @deskbfirstf,
  158. ;=====================
  159. ; begin master desktop batch loop
  160. @while(fc<=FA+1,
  161.     @memavail,
  162.     @selecttype,
  163.     ;return from scanclip SUB-loop
  164.     @memavail,
  165.     @deskbcalcend,
  166.     @setselection(HOMEBAT),
  167.     @if(BATP="Y",@pk("{CTRL-P}b")),
  168.     @deskbnextf,
  169.     @echo(#on),
  170.     @echo(#off))
  171. Deskbloop
  172. @eraseprompt,
  173. @prompt(" Getting and preparing to scan Frame #1."),
  174. @beep(0,80)
  175. Deskbfirstf
  176. #FALSE
  177. @if(fc<=FA, @list(
  178.                 @eraseprompt,
  179.                 batk :=batk+1,
  180.                 @beep(1000,10),
  181.                 @prompt(" Finished with Frame #" &@business(batk,0) &" in batch. Getting Frame #" &@business(batk+1,0) & "."),
  182.                 @beep(0,80)))
  183.  Frame 
  184. Deskbcalcend
  185. #FALSE
  186.     ;select next frame
  187.     fc:=fc+1,
  188.        @PK("{dnarrow}"),
  189.     HOMEBAT :=@setselection,
  190.     HOMEG:=HOMEBAT,
  191.     @iserr(@isdocument("OTEMPOO")),@beep(0,0),@list(
  192.         @delete("OTEMPOO"))),
  193. @deskbnextfcalc
  194. Deskbnextf
  195. #FALSE
  196. @if(fc<=FA, @list(
  197.                 @eraseprompt,
  198.                 @beep(1000,10),
  199.                 @prompt(" Now preparing to scan Frame #" &@business(batk+1,0) & "."),
  200.                 @beep(0,80)))
  201. o scan F
  202. deskbnextfcalc
  203. #FALSE
  204. ; select program module for type of frame being scanned
  205.     ; identify frametype selected
  206. @local(FT,FX),
  207. FT :=@frametype,
  208. @if(FT<>15,@setselection(HOMEG)),
  209. IFT:=FT,
  210. LPF:=0,
  211. TL:=0,
  212. @if(FT=5,FX:=1),                   ;outline
  213. @if(@or(FT=8,FT=9,FT=14),FX:=2),   ;word
  214. @if(FT=15,FX:=3),                  ;formula
  215. @if(@or(FT=7,FT=12),FX:=4),        ;database
  216. @if(@or(FT=6,FT=11),FX:=5),        ;spreadsheet
  217. @if(@or(FT<5,Ft>15,FT=10,FT=13),FX:=6), ; all others
  218.     ; execute appropriate module
  219. @select(FX,@scOUTLINE,@scWORD,@scFORMULA,@scDBSH,@scDBSH,@scWrong)
  220. Selecttype
  221. Program paths for frame types
  222. up prog
  223. scOutlines
  224. #FALSE
  225. COUNTOUT:=0,
  226. @Setview,
  227. @Directtotype
  228. scOutline
  229. #TRUE
  230. ;test and change view
  231. @local(v),
  232. @pk("{ctrl-out}"),
  233. v:=@frameview,
  234. @if(v=6,@pk("{f10}")),
  235. ;open all
  236. @pk("{ctrl-f}O")
  237. 6,@pk("{f10}"))
  238. Setview
  239. #FALSE
  240. ;test for setup bypass of prompt
  241. @if(OTX<>"Y", @list(
  242.     @echo(#on),
  243.     @beep(1000,3),
  244.     @eraseprompt,
  245.     @local(typeO),
  246.     typeO :=@inputline("Scan outline for : [T]ext, [F]ormula, or [L]abel? Enter T/F/L.","T",#no,#yes),
  247.     @if(@and(typeO<>"T",typeO<>"F",typeO<>"L"),@list(
  248.                         @eraseprompt,
  249.                         @beep,
  250.                         @prompt(" Improper entry, try again."),
  251.                         @beep(0,120),
  252.                         @return(0))),
  253.     @if(typeO="T",@scOUTLINEw),
  254.     @if(typeO="F",@scOUTLINEf),
  255.     @if(typeO="L",@scOUTLINEl))),
  256. ;if controlled by setup
  257. @if(OTX="Y", @list(
  258.     @if(OTT="T",@scOUTLINEw),
  259.     @if(OTT="F",@scOUTLINEf),
  260.     @if(OTT="L",@scOUTLINEl)))
  261. Directtotype
  262. Outline Types
  263. @OWBEGIN
  264. scOUTLINEw
  265. ; Scan & Clip  
  266.     ; by Gary Reger
  267.         ;VERSION 
  268. 90-07-23
  269. ;-------------------------------------
  270. ; IN AN OUTLINE - WORD FRAME
  271. @setselection(HOMEG),
  272. @prep,
  273. @Labelblank,
  274. @Firstframe,
  275. home:=@setselection,
  276. @local(count),
  277. count:=0,
  278. ;=====================
  279. ; begin master outline loop
  280. @isabend(#false),
  281. @while(@isabend=#false,
  282.     @memavail,
  283.     @SETSELECTION(HOME),
  284.     @pk("{f9}"),
  285.     @outwpageset,
  286.   ; --- BEGIN Scan & Clip 
  287. SUB-loop ---
  288.     @scanclip,
  289. ;return from scanclip SUB-loop
  290.     @isabend(#false),
  291. ; END scan & clip loop  STILL within master loop
  292.         ;cleanup source subframe
  293.       @cleansource,
  294.         ;reset k
  295.       @resetk,
  296.         ;cleanup target
  297.       @cleantarget,
  298.         ;move to next subframe
  299.       @nextoutframe,
  300.         ;test for end of frame
  301.       @endframeQ),
  302. ; end master loop
  303. ;=======================
  304. ; prepare report
  305. @report
  306. OWBEGIN
  307.     ;label any unnamed subframes
  308. @pk("{ctrl-out}{in}{home}"),
  309. @local(lk,lkb),
  310. lk:=0,
  311. @isabend(#false),
  312. @while(@isabend=#false,
  313.             lk:=lk+1,
  314.               @if(@setselection=homeg &".[]",@list(
  315.               lkb:=@business(lk,0),
  316.               @pk(lkb &"{return}"))),
  317.                @pk("{dnarrow}")),
  318. @pk("{ctrl-home}"),
  319. @echo(#on)
  320. dnarro
  321. Labelblank
  322. ; prepare to begin master outline loop with first frame
  323. @echo(#off),
  324. @eraseprompt,
  325. @echo(#on,2),
  326. @echo(#off),
  327. @prompt("                Now scanning and clipping, please wait..."),
  328. @pk("{ctrl-home}"),
  329. home :=@setselection,
  330. ;test for containing subframe w/out text
  331. @local(type),
  332. type:=@frametype,
  333. @while(type=5,
  334.     @pk("{dnarrow}"),
  335.     type:=@frametype),
  336. ;prep to go back to begin loop
  337. @isabend(#false),
  338. home:=@setselection,
  339. k :=0
  340. Firstframe
  341. #TRUE
  342.       @local(type),
  343.       @setselection(HOME),
  344.       @pk("{dnarrow}"),
  345. home:=@setselection,
  346.          
  347.       type:=@frametype,
  348.       @while(type=5,
  349.             @pk("{dnarrow}"),
  350.              type:=@frametype),
  351.       home :=@setselection,
  352.       @isabend(#false)
  353. nextoutframe
  354.     @pk("{ctrl-end}"),
  355.     LPF:=@panel2,
  356.     @pk("{Ctrl-home}"),
  357.     TL:=TL+LPF
  358. outwpageset
  359. #TRUE
  360.       @setselection(home),
  361.       @pk("{f9}{ctrl-end}{f6}"),
  362.       @PK(@REPT("{uparrow}",BLOCKTS)),
  363.       @pk("{uparrow}{del}"),
  364.       @pk("{ctrl-home}{f6}"),
  365.       @PK(@REPT("{dnarrow}",BLOCKTS)),
  366.       @pk("{uparrow}{del}"),
  367.       @isabend(#false),
  368.       @pk("{out}")
  369. del}"),
  370. cleansource
  371.       k :=k-1
  372. resetk
  373. #TRUE
  374.       @setselection("ClipOW"),
  375.       @pk("{f9}{CTRL-END}{f6}"),
  376.       @PK(@REPT("{uparrow}",BLOCKTS)),
  377.       @pk("{ctrl-7}{uparrow}{del}")
  378. ("{uparr
  379. cleantarget
  380. #FALSE
  381. @isabend(#false),
  382. @pk("{dnarrow}"),
  383. @IF(@ISABEND=#TRUE,COUNTOUT:=COUNTOUT+1),
  384. @IF(COUNTOUT<2,@ISABEND(#FALSE))
  385. ,COUNTO
  386. endframeQ
  387. #FALSE
  388. ; Scan & Clip  
  389.     ; by Gary Reger
  390.         ;VERSION 
  391. 90-07-23
  392. ;-------------------------------------
  393. ; IN AN OUTLINE - FORMULA AREA FRAME
  394. OTS:="F",
  395. @prep,
  396. @setselection(HOMEG),
  397. ;prepare sub-frames
  398. @local(home),
  399. home:=@setselection,
  400. @pk("{ctrl-out}{in}{home}"),
  401.     ;label any unnamed subframes
  402. @local(lk,lkb),
  403. lk:=0,
  404. @isabend(#false),
  405. @while(@isabend=#false,
  406.             lk:=lk+1,
  407.               @if(@setselection=home &".[]",@list(
  408.               lkb:=@business(lk,0),
  409.               @pk(lkb &"{return}"))),
  410.                @pk("{dnarrow}")),
  411. ; prepare to begin master outline loop
  412. @pk("{ctrl-out}{in}{home}"),
  413. @eraseprompt,
  414. @echo(#on,2),
  415. @echo(#off),
  416. @prompt("                Now scanning and clipping, please wait..."),
  417. @isabend(#false),
  418. @local(ks,l,pf,pp),
  419. k :=0,
  420. ;=====================
  421. ; begin master outline loop
  422.     HOMEG :=@Setselection,
  423.     @pk("{f2}{f9}{ctrl-end}"),
  424. @while(@isabend=#false,
  425.   ; --- BEGIN Scan & Clip 
  426. SUB-loop ---
  427.     LPF:=@panel2,
  428.     @pk("{Ctrl-home}"),
  429.     TL:=TL+LPF,
  430.     @scFORMULA,
  431. ;return from formula scanclip SUB-loop
  432.       @isabend(#false),
  433.       @pk("{ctrl-out}"),
  434.       @setselection(HOMEG),
  435.       @isabend(#false),
  436.       @pk("{dnarrow}"),
  437.       @echo(#on,2),
  438.       @echo(#off),
  439.       HOMEG :=@setselection,
  440.       @if(@isabend=#true,@endscl),
  441.       @Pk("{f2}{f9}")
  442. ; end master loop
  443. ;=======================
  444. scOUTLINEf
  445. #TRUE
  446. ; OUTLINE Labels
  447. OTS:="L",
  448. @echo(#off),
  449. @pk("{ctrl-out}"),
  450. HOMEG:=@setselection,
  451. @PK("TEMPNAME{RETURN}"),
  452. @writetextfile("otempoo.txt",TEMPNAME),
  453. @pk("{ctrl-d}gotempoo.txt{return}"),
  454. @pk("{ctrl-out}{end}"),
  455. @SETSELECTION("tempname"),
  456. @pk(HOMEG &"{return}"),
  457. @setselection("otempoo"),
  458. @scword,
  459. @delete("otempoo")
  460. ion("otempoo"
  461. scOUTLINEl
  462. ; word prep module, all frame types destined to be processed as word frame
  463. @prep,
  464.                                                    ; originally a:
  465. @if(IFT=5,@setselection("otempoo")),                   ;outline
  466. @if(@or(IFT=8,IFT=9,IFT=14),@setselection(HOMEG)),     ;word
  467. @if(IFT=15,@setselection("otempoo")),                  ;formula
  468. @if(@or(IFT=7,IFT=12),@setselection("otempoo")),       ;database
  469. @if(@or(IFT=6,IFT=11),@setselection("otempoo")),       ;spreadsheet
  470. @scWORDproc,
  471. ; prepare report
  472. @report
  473. scWORDproc,
  474. scWord
  475. #FALSE
  476. ; Scan & Clip  
  477.     ; by Gary Reger
  478.         ;VERSION 
  479. 90-07-23
  480. ;-------------------------------------
  481. ; IN A WORD FRAME
  482. @echo(#on),
  483. @echo(#off),
  484. ;prepare frame
  485.     ; test for frame lines to use in page calc.
  486. @local(home),
  487. home:=@setselection,
  488. @pk("{ctrl-out}{in}"),
  489. @pk("{f9}{ctrl-end}"),
  490. LPF:=@panel2,
  491. @pk("{Ctrl-home}{f9}"),
  492.     ;label if frame is unnamed
  493. @local(lk),
  494. lk:="Unnamed Frame",
  495. @if(@setselection=".[]",
  496.               @pk(lk &"{return}")),
  497. ; prepare to begin master scan and clip word frame loop
  498. @pk("{ctrl-out}"),
  499. @eraseprompt,
  500. @echo(#on,2),
  501. @echo(#off),
  502. @prompt("                Now scanning and clipping, please wait..."),
  503. @PK("{in}"),
  504. @isabend(#false),
  505. k :=0,
  506. ;=====================
  507. ; begin master word loop
  508. @while(@isabend=#false,
  509.   ; --- BEGIN Scan & Clip 
  510. SUB-loop ---
  511.     @scanclip,
  512. ;return from scanclip SUB-loop
  513.     @isabend(#false),
  514.     home:=@setselection,
  515. ; END scan & clip loop - clean-up subframe & target frame, rest k,
  516. ;test for end of doc. STILL within master loop
  517.       @pk("{ctrl-end}{f6}"),
  518.       @PK(@REPT("{uparrow}",BLOCKTS)),
  519.       @pk("{uparrow}{del}"),
  520.       @pk("{ctrl-home}{f6}"),
  521.       @PK(@REPT("{dnarrow}",BLOCKTS)),
  522.       @pk("{uparrow}{del}"),
  523.       @isabend(#false),
  524.       @pk("{f9}"),
  525.       @PK("{CTRL-L}GClipOW{RETURN}"),
  526.       k :=k-1,
  527.       @pk("{f9}{CTRL-END}{f6}"),
  528.       @PK(@REPT("{uparrow}",BLOCKTS)),
  529.       @pk("{ctrl-7}{uparrow}{del}"),
  530.       @PK("{CTRL-L}G"&home &"{RETURN}"),
  531.       @isabend(#false),
  532.       @Pk("{f9}{ctrl-end}{Pgdn}"),
  533.       @isabend(#false),
  534.       @pk("{pgdn}"))
  535. ; end master loop
  536. ;=======================
  537. gdn}"))
  538. scWORDproc
  539. #FALSE
  540. ; Scan & Clip  
  541.     ; by Gary Reger
  542.         ;VERSION 
  543. 90-07-23
  544. ;-------------------------------------
  545. ; IN A FORMULA
  546. @beep(220,15),
  547. @eraseprompt,
  548. @echo(#off),
  549. @prompt(" Duplicating formula as text, for scanning. Please wait..."),
  550. @pk("{ctrl-home}{f6}{ctrl-end}{return}{shift-f7}"),
  551. @pk("{ctrl-home}{esc}"),
  552. HOMEG :=@setselection,
  553. @pk("{ctrl-out}"),
  554.     @iserr(@isdocument("OTEMPOO")),@beep(0,0),@list(
  555.         @delete("OTEMPOO"))),
  556. @pk("{ctrl-c}Eotempoo{return}{in}{shift-f8}{ctrl-home}{rightarrow}{out}"),
  557. @scWord,
  558. @echo(#off),
  559. @delete("oTempoo"),
  560. @if(OTS<>"F",@list(
  561.         @pk("{f9}")))
  562. @delet
  563. scFORMULA
  564. ; Scan & Clip  
  565.     ; by Gary Reger
  566.         ;VERSION 
  567. 90-07-23
  568. ;-------------------------------------
  569. ; IN A DATABASE or SPREADSHEET
  570. @beep(220,15),
  571. @eraseprompt,
  572. @echo(#off),
  573. @prompt(" Duplicating records as text, for scanning. Please wait..."),
  574. ;identify source frame
  575. @pk("{ctrl-out}"),
  576. HOMEG :=@setselection,
  577. @memavail,
  578. ;create target frame
  579.     @iserr(@isdocument("OTEMPOO")),@beep(0,0),@list(
  580.         @delete("OTEMPOO"))),
  581. @pk("{ctrl-c}Eotempoo{return}{ctrl-w}r255{return}"),
  582. ;copy data from source to target
  583. @memavail,
  584. @setselection(HOMEG),
  585. @pk("{ctrl-in}"),
  586. @pk("{ctrl-home}{f6}{ctrl-end}{return}{f8}"),
  587. @pk("{ctrl-out}"),
  588. @setselection("otempoo"),
  589. @isabend(#false),
  590. @pk("{in}{return}{ctrl-home}"),
  591. ; CHECK FOR TOO LARGE DATABASE OR SPREADSHEET
  592.     @IF(@isabend=#false,
  593.         @list(@pk("{ctrl-home}"),
  594.                @setselection(homeg),
  595.              @scWord),
  596.         @LIST(@eraseprompt,
  597.              @beep,@beep(500,24),@beep,
  598.              @inputline("Source Frame Contains Too Many Characters; {return} to abort. See Documentation"),
  599.              @beep(0,120),
  600.              @return(0)))
  601. scDBSH
  602. @beep,@beep,
  603. @eraseprompt,
  604. @prompt("  Wrong Frametype: outline, word, empty, database, spreadsheet & formula, ONLY."),
  605. @beep(523,5),
  606. @beep(0,180),
  607. @beep(523,5)
  608. formul
  609. scWRONG
  610. Common program modules
  611. ;Search criteria
  612. @eraseprompt,
  613. @beep(1000,10),
  614. SC:=@inputline(" Enter Search Criteria (e.g. Tom*); end with {return}."),
  615. @beep(1000,5)
  616. riteria (
  617. SetSearch
  618. ;set block size,
  619.     ;if setup to choose permanent
  620. @if(BSPX="N",BS:=BSPn,
  621.    ; else - set at prompt
  622.     @list(
  623.         @local(bl),
  624.         @eraseprompt,
  625.         @beep(523,2),
  626.         bl:=@inputline("Enter block size to capture; e.g. 5 : sets 5 lines above & 5 lines below", BSPN,,#yes),
  627.         BS :=bl)),
  628. ; set block capture size
  629. BLOCKTS:=@value(BS)
  630. ; set b
  631. SetBlock
  632. ClipOW
  633. .sclprg2.[St 
  634. ; clear key menu choices
  635. @echo(#off),
  636. @pk("{ctrl-L}s{out}{del}r{out}{del}g{out}{del}{out}"),
  637. ;PROMPT PROCESS
  638. @echo(#on,2),
  639. @eraseprompt,
  640. @prompt(" Preparing Frame to Scan, please wait..."),
  641. @echo(#off),
  642. ; clear search menu
  643. @pk("{ctrl-l}s{out}{del}{esc}"),
  644. ;create containing target frame
  645. @pk("{ctrl-out}{ctrl-c}eClipOW{return}"),
  646. @setselection(HOMEG)
  647. @pk("{ctrl-ou
  648. Scan&Clip Loop
  649. 3138656 
  650. ;clear undo buffer
  651. @memavail,
  652. ; Adjust for parameters of new frame or subframe that is calling
  653.     ; SET variables
  654. ks :="1",
  655. home:=@setselection,
  656. @SETLINEREF,
  657. ;set page factor
  658. @PAGEFACTOR,
  659. ;set space at bottom to assure available block space at end
  660. @SETBOTTOM,
  661. ; set space at top to assure block size available on first block
  662. @PK(@REPT("{RETURN}",BLockts)),
  663. @PK("{CTRL-HOME}"),
  664.   ; --- BEGIN Scan & Clip 
  665. loop ---
  666.     @isabend(#false),
  667.     lpp:=@VALUE(LP),
  668.     @while(@isabend=#false,
  669.         @SCLSEARCH,
  670.         @calclocpage,
  671.         @BLOCKSELECT,
  672.           @CUTX,
  673.           @SETK,
  674.           @pastehit,
  675.           @HITCOUNT,
  676.           @RESETSCL),
  677. ;clear undo buffer
  678. @memavail
  679.       @RESET
  680. ScanClip
  681. #FALSE
  682. py page
  683. lect&
  684. @if(IFT=5,@list(homet:=home,fd :="subframe line",pgcl:=PR1)),
  685. @if(@or(IFT=8,IFT=9,IFT=14),@list(homet:=home,fd :="frame line",pgcl:=PR1)),
  686. @if(IFT=15,@list(homet:=HOMEG,fd :="formula line",pgcl :=PR2)),
  687. @if(@and(IFT=5,OTS="F"),@list(homet:=HOMEG,fd :="subframe formula line",pgcl:=PR1)),
  688. @if(@and(IFT=5,OTS="L"),@list(homet:=HOMEG,fd :="absolute subframe #",pgcl:=PR1)),
  689. @if(@or(IFT=7,IFT=12),@list(homet:=HOMEG,fd :="record #",pgcl:=PR2)),
  690. @if(@or(IFT=6,IFT=11),@list(homet:=HOMEG,fd :="row #",pgcl:=PR2))
  691. T=6,IFT=11)
  692. SETLINEREF
  693. @if(@and(IFT=5,OTS<>"L"),@list(
  694.             @pk("{out}"),
  695.             @echo(#on,2),
  696.             @echo(#off),
  697.             @pk("{in}"),
  698.             pf:=TL-LPF,
  699.             @pk("{in}{f9}")),
  700.           pf:=0)
  701. PAGEFACTOR
  702. #FUNCTION
  703. [,|*l
  704. @pk("{ctrl-end}"),
  705. @PK(@REPT("{RETURN}",BLOCKTS)),
  706. ;mark end search tag
  707. @pk("{ctrl-end}{return}" &home &" searched on: ` " &SC &" ' ; end sub-frame marker."),
  708. @pk("{CTRL-HOME}{pgup}"),
  709. @RETURN(0)
  710. me marker."),
  711. SETBOTTOM
  712. #TRUE
  713.         @pk("{CTRL-L}s"),
  714.         @pk(SC),
  715.         @if(@isabend=#true,@return(0)),
  716.           @pk("{return}")
  717. SCLSEARCH
  718.           l:=@business(@panel2-BLOCKTS,0),
  719.           @if(@or(IFT=7,IFT=12),l:=@business(@panel2-BLOCKTS-2,0)),
  720.           @if(@or(IFT=6,IFT=11),l:=@business(@panel2-BLOCKTS-1,0)),
  721.           pp:=@business(@ceiling((@panel2+pf)/lpp),0)
  722. TS-1,0)),
  723. calclocpage
  724. #TRUE
  725.         @pk("{RIGHTARROW}"),
  726.           @PK(@REPT("{uparrow}",BLOCKTS)),
  727.             @pk("{HOME}{F6}"),
  728.           @PK(@REPT("{dnarrow}",BLOCKTS*2)),
  729.         @pk("{END}{RETURN}")
  730. (@REPT("{dna
  731. BLOCKSELECT
  732. OTEMPOO
  733. Hits]
  734.         @pk("{F8}{f9}"),
  735.           @setselection("ClipOW")
  736.         k :=k+1,
  737.         ks:=@business(k,0)
  738. #TRUE
  739. ;paste hit to report frame
  740.              @pk("{f9}{CTRL-END}{RETURN}{home}{return}{return}  ** Hit #"),
  741.           @pk(ks),
  742.           @pastelab,
  743.           @pk("{return}{return}{return}{ctrl-END}{RETURN}{return}{ctrl-out}"),
  744.           @memavail,
  745.           @setselection(home),
  746.           @isabend(#false)
  747. etselection
  748. pastehit
  749. #TRUE
  750.       @pk(". Frame " &homet &", " &fd &" " &l & ", at " &pgcl &" " &pp &".")
  751. pastelab
  752. #FUNCTION
  753. @local(ks),
  754. ks:= @item1,
  755. @prompt(" Hit# " &ks &". Still scanning and clipping, please wait...")
  756. scLprompt
  757.           @pk("{f9}{dnarrow}{uparrow}"),
  758.           @if(@isabend=#true,
  759.                 @list(@eraseprompt,
  760.                       ks:=@business(k-1,0),
  761.                       @sclprompt(ks)),
  762.                              
  763.                 @list(@eraseprompt,
  764.                       @scLprompt(ks)))
  765.           @li
  766. HITCOUNT
  767. #TRUE
  768.           @PK(@REPT("{uparrow}",BLOCKTS)),
  769.           @if(BPX="Y",@PK(@REPT("{dnarrow}",@value(BPn)))),
  770.           @pk("{end}")
  771.           @if(BPX="Y"
  772. RESETSCL
  773. Report Mods
  774. ; Prepare report frame
  775. @local(ks,home),
  776. ks:=@business(k,0),
  777. ;rename target/result frame
  778. @beep(1000,5),
  779. @eraseprompt,
  780. @prompt(" Scan complete, " &ks &" hits. Now preparing report, please wait..."),
  781. @pk("{ctrl-out}"),
  782. @if(@or(IFT=6,IFT=7,IFT=11,IFT=12,IFT=15,OTS="F",OTS="L"),home:=HOMEG,home :=@setselection),
  783. @PK("{CTRL-L}GClipOW{RETURN}"),
  784. @pk("{ctrl-out}"),
  785. @pk(SC &" Hits{return}{IN}{f9}{ctrl-end}{return}"),
  786. @pk("{ctrl-w}c"),
  787. @pk(" End of report for scan of ` " &home &" '{return}"),
  788. @pk("For ` " &Sc &" '{return}"),
  789. @pk("{ctrl-w}n{return}"),
  790. @pk("{return}{ctrl-home}"),
  791. @pk("{ctrl-w}c"),
  792. @pk("Scan of ` " &home &" '{return}"),
  793. @pk("For ` " &Sc &" '{return}"),
  794. @pk("[ With search block of " &BS &" lines above & below each hit ]"),
  795. @pk("{return}{ctrl-w}n{return}"),
  796. ; re-format and set printing
  797. @pk("{ctrl-out}{ctrl-w}l" &ML &"{return}"),
  798. @pk("{ctrl-out}{ctrl-w}r" &MR &"{return}"),
  799. @pk("{ctrl-p}fpo" &PO &"{return}w" &PW &"{return}fc<page>{return}{esc}{esc}"),
  800. ; mark hits
  801. @if(@and(MHX="Y",MHO="Q"),@RepmhQ),
  802. @if(@and(MHX="Y",MHO<>"Q"),@RepmhR),
  803. ; optional delete ascii page codes in report
  804. @if(DPCX="Y",@DeletePC),
  805. ;set report notes
  806. @PK("{IN}"),
  807. @if(PX1="Y",@list(
  808.         @pk("{ctrl-home}{ctrl-l}s]{return}{rightarrow}"),
  809.         @pk("{ctrl-e}fc " &PN1 &"{return}"))),
  810. @if(PX2="Y",@list(
  811.         @pk("{ctrl-end}{ctrl-3}{uparrow}{end}"),
  812.         @pk("{ctrl-e}fc " &PN2 &"{return}"))),
  813. @pk("{f9}{ctrl-home}"),
  814. @echo(#on)
  815. Report
  816. #FALSE
  817. ; mark hits by regualr method
  818.     @eraseprompt,
  819.     @prompt("             Marking Hits in report, please  wait...."),
  820.     @LOCAL(HM,pm),
  821.     HM:=HITMARK,
  822.     pm:=0,
  823.     @pk("{in}{ctrl-home}"),
  824.     @isabend(#false),
  825.     @while(@isabend=#false,
  826.         @pk("{CTRL-L}s"),
  827.         @pk(SC &"*>"),
  828.           @pk("{return}"),
  829.           @if(Pm=1,pm:=0,pm:=pm+1),
  830.         @eraseprompt,
  831.         @if(Pm=1,@prompt("                                 |
  832. .     |"),
  833.                    @prompt("                                 |    .
  834. .    
  835. |")),
  836.         @pk("{ctrl-w}" &HM),
  837.         @pk("{RIGHTARROW}"),
  838.         @pk("{ctrl-w}n"),
  839.           @isabend(#false),
  840.           @PK(@REPT("{dnarrow}",BLOCKTS)),
  841.           @pk("{ctrl-4}{dnarrow}"), 
  842.           @PK(@REPT("{uparrow}",BLOCKTS)),
  843.           @pk("{ctrl-4}{uparrow}"))
  844.   @PK(@RE
  845. RepmhR
  846. #TRUE
  847. ; mark hits by quick routine
  848.     @eraseprompt,
  849.     @prompt("             Marking Hits in report, please  wait...."),
  850.     @LOCAL(HM,pm),
  851.     HM:=HITMARK,
  852.     @pk("{in}"),
  853.     @isabend(#false),
  854.     @pk("{CTRL-L}r"),
  855.     @pk(SC),
  856.      @pk("{return}"),
  857.     @pk(".{backspace}"),
  858.     @pk("{ctrl-w}" &HM),
  859.     @pk(SC),
  860.      @pk("{return}{end}")
  861.     @pk("{
  862. RepmhQ
  863. #TRUE
  864. ; OPTIONAL DELETE  ASCII 012 
  865. , page codes from Report
  866. @pk("{ctrl-home}{ctrl-l}r
  867. {return} {backspace}{return}{end}"),
  868. @pk("{ctrl-home}")
  869. home}{ct
  870. Deletepc
  871. ; clear display
  872. @echo(#off),
  873. @PK("{ESC}{ESC}{CTRL-OUT}{CTRL-D}C"),
  874. @echo(#on),
  875. @echo(#off),
  876. ; clean up frames/desktop
  877. @ERASEPROMPT,
  878. @setselection("scldisp"),
  879. @pk("{f9}{ctrl-home}{f6}{ctrl-end}{del}{f9}{ctrl-out}{return}{scroll-lock}"),
  880.     @iserr(@isdocument("clipow")),@beep(0,0),@list(
  881.         @delete("clipow"))),
  882.     @iserr(@isdocument("OTEMPOO")),@beep(0,0),@list(
  883.         @delete("OTEMPOO"))),
  884. @PK("{ESC}{ESC}"),
  885. @memavail,
  886. @BEEP(3000,10),
  887. @echo(#on)
  888. emavail,
  889. Endscl
  890. Setup modules
  891. @menu(Setup Menu)
  892. Setup menu
  893. Report parameters
  894. Footnotes
  895. @return(@inputline("Enter new value. Current setting is " &PX1
  896.  &". Default setting is in prompt line.",setup defaults.Setting.dPX1,#no,#yes))
  897. PX1 ; toggle report note #1 on(Y)/off(N)
  898. This report is CONFIDENTIAL.
  899. r at t
  900. @return(@inputline("Enter new value. Current setting is " &PN1
  901.  &". Default setting is in prompt line.",setup defaults.Setting.dPN1,#no,#yes))
  902. in prompt 
  903. PN1 ; contents of report note #1
  904. @return(@inputline("Enter new value. Current setting is " &PX2
  905.  &". Default setting is in prompt line.",setup defaults.Setting.dPX2,#no,#yes))
  906. PX2 ; toggle report note #2 on(Y)/off(N)
  907. Page cross references in this report are
  908. calculated. When a document is printed page breaks
  909. are affected by many factors. The page cross
  910. references in this report may not correspond to
  911. the page numbers of your particular hard copy,
  912. either because the calculation parameters were
  913. improperly set or because of the printing
  914. characteristics of your document.
  915. to the
  916. @return(@inputline("Enter new value. Current setting is " &PN2
  917.  &". Default setting is in prompt line.",setup defaults.Setting.dPN2,#no,#yes))
  918. in prompt 
  919. PN2 ; contents of report note #2
  920. #TBD!
  921. @quitmenu
  922. Document page description
  923. hard copy page
  924. @return(@inputline("Enter new value. Current setting is " &PR1&". Default setting is in prompt line.",setup defaults.Setting.dPR1,#no,#yes))
  925. PR1 ; description source hard copy for page cross
  926. reference in report for text frames
  927. n sourc
  928. hard copy page
  929. @return(@inputline("Enter new value. Current setting is " &PR2 &". Default setting is in prompt line.",setup defaults.Setting.dPR2,#no,#yes))
  930. lt setting is i
  931. PR2 ; description source hard copy for page cross
  932. reference in report for other frame types
  933. #TBD!
  934. @quitmenu
  935. Margin & printing attributes
  936. @return(@inputline("Enter new value. Current setting is " &ML
  937.  &". Default setting is in prompt line.",setup defaults.Setting.dML,#no,#yes))
  938. ult settin
  939. ML; left margin width
  940. @return(@inputline("Enter new value. Current setting is " &MR
  941.  &". Default setting is in prompt line.",setup defaults.Setting.dMR,#no,#yes))
  942. MR; right margin width
  943. @return(@inputline("Enter new value. Current setting is " &PO
  944.  &". Default setting is in prompt line.",setup defaults.Setting.dPO,#no,#yes))
  945. PO; printing offset
  946. @return(@inputline("Enter new value. Current setting is " &PW
  947.  &". Default setting is in prompt line.",setup defaults.Setting.dPW,#no,#yes))
  948. PW; printing width
  949. @return(@inputline("Enter new value. Current setting is " &DPCX
  950.  &". Default setting is in prompt line.",setup defaults.Setting.dDPCX,#no,#yes))
  951. ng is in prompt
  952. DPCX ; toggle delete ASCII page codes from report, on(Y)/off(N)
  953. DPCX ; 
  954. #TBD!
  955. @quitmenu
  956. Hit marks
  957. @return(@inputline("Enter new value. Current setting is " &MHX
  958.  &". Default setting is in prompt line.",setup defaults.Setting.dMHX,#no,#yes))
  959. MHX ; toggle whether to highlight hits in report, on(Y)/off(N)
  960. MHX ; t
  961. @return(@inputline("Enter new value. Current setting is " &MHO
  962.  &". Default setting is in prompt line.",setup defaults.Setting.dMHO,#no,#yes))
  963. MHO ; [R]egular marking method or [Q]uick mark
  964. @return(@inputline("Enter new value. Current setting is " &HITMARK
  965.  &". Default setting is in prompt line.",setup defaults.Setting.dHITMARK,#no,#yes))
  966. is in pro
  967. HITMARK ; method of highlighting hits
  968. #TBD!
  969. @quitmenu
  970. #TBD!
  971. @quitmenu
  972. Context block parameters
  973. @return(@inputline("Enter new value. Current setting is " &BSPX
  974.  &". Default setting is in prompt line.",setup defaults.Setting.dBSPX,#no,#yes))
  975. ng is in prompt
  976. BSPX ; toggle user set block size by prompt, on(Y)/off(N)
  977. @return(@inputline("Enter new value. Current setting is " &BSPn
  978.  &". Default setting is in prompt line.",setup defaults.Setting.dBSPn,#no,#yes))
  979. ng is in prompt
  980. BSPn ; size of block default, if BSPX off(N)
  981. @return(@inputline("Enter new value. Current setting is " &BPX
  982.  &". Default setting is in prompt line.",setup defaults.Setting.dBPX,#no,#yes))
  983. BPX ; toggle avoid close proximity hits, on(Y)/off(N)
  984. @return(@inputline("Enter new value. Current setting is " &BPn
  985.  &". Default setting is in prompt line.",setup defaults.Setting.dBPn,#no,#yes))
  986. BPn ; size of close proximity range if BPX on(Y)
  987. #TBD!
  988. @quitmenu
  989. Page parameters
  990. @return(@inputline("Enter new value. Current setting is " &LP
  991.  &". Default setting is in prompt line.",setup defaults.Setting.dLP,#no,#yes))
  992. LP  ; screen lines per page of hard copy
  993. #TBD!
  994. @quitmenu
  995. Batch operation options
  996. @return(@inputline("Enter new value. Current setting is " &BATX
  997.  &". Default setting is in prompt line.",setup defaults.Setting.dBATX,#no,#yes))
  998. ng is in prompt
  999. BATX ; toggle multi-frame batch operation on(Y)/off(N)
  1000. @return(@inputline("Enter new value. Current setting is " &BATT
  1001.  &". Default setting is in prompt line.",setup defaults.Setting.dBATT,#no,#yes))
  1002. ng is in prompt
  1003. BATT ; set type of multi-frame batch if on(Y), disk(D) or FW
  1004. desktop(FW)
  1005. @return(@inputline("Enter new value. Current setting is " &BATP
  1006.  &". Default setting is in prompt line.",setup defaults.Setting.dBATP,#no,#yes))
  1007. ng is in prompt
  1008. BATP ; toggle batch printing on(Y)/off(N)
  1009. #TBD!
  1010. @quitmenu
  1011. Outline control
  1012. @return(@inputline("Enter new value. Current setting is " &OTX
  1013.  &". Default setting is in prompt line.",setup defaults.Setting.dOTX,#no,#yes))
  1014. OTX ; toggle bypass prompt control of outline type, on(Y)/off(N)
  1015. OTX ; t
  1016. @return(@inputline("Enter new value. Current setting is " &OTT
  1017.  &". Default setting is in prompt line.",setup defaults.Setting.dOTT,#no,#yes))
  1018. OTT ; set outline type to process, if OTX on(Y): T/F/L
  1019. #TBD!
  1020. @quitmenu
  1021. @return(@inputline("Enter new value. Current setting is " &Display Key Settings
  1022.  &". Default setting is in prompt line.",setup defaults.Setting.dDX,#no,#yes))
  1023.  in prompt
  1024. Display Key Settings
  1025. ry.[{Alt-S}].S
  1026. @ECHO(#OFF),
  1027. @eraseprompt,
  1028. @prompt(" Re-setting defaults. Recalculation will take a moment."),
  1029. @LOCAL(HT),
  1030. HT:=@SETSELECTION,
  1031. @SETSELECTION("Setup Defaults"),
  1032. @PK("{IN}{F5}{OUT}"),
  1033. @SETSELECTION(HT),
  1034. @ECHO(#ON),
  1035. @eraseprompt
  1036. N}{F5}{OUT}")
  1037. All reset (set all to "permanent" defaults)
  1038. #TBD!
  1039. @quitmenu
  1040. (v(j(^(R(F(
  1041.  '{retur
  1042. Setup Defaults ; {F9} to view & change
  1043. @pk("Sear
  1044. Default Name
  1045. Setting
  1046. Options
  1047. Set Formula
  1048. hard copy page
  1049.  Any text; only part may show
  1050. hard copy page
  1051. PR1 :=Setting.dPR1
  1052. dPR2 
  1053. hard copy page
  1054.  Any text; only part may show
  1055. hard copy page
  1056. PR2 :=Setting.dPR2
  1057. @PERFORMKE
  1058. dPX1 
  1059. PX1 :=Setting.dPX1
  1060. dPN1 
  1061. This report is CONFIDENTIAL.
  1062.  Any text; only part may show
  1063. This report is CONFIDENTIAL.
  1064. PN1 :=Setting.dPN1
  1065.         @PER
  1066. dPX2  
  1067. PX2 :=Setting.dPX2
  1068. dPN2 
  1069. Page cross references in this report are
  1070. calculated. When a document is printed page breaks
  1071. are affected by many factors. The page cross
  1072. references in this report may not correspond to
  1073. the page numbers of your particular hard copy,
  1074. either because the calculation parameters were
  1075. improperly set or because of the printing
  1076. characteristics of your document.
  1077.  or because of
  1078.  Any text; only part may show
  1079. Page cross references in this report are
  1080. calculated. When a document is printed page breaks
  1081. are affected by many factors. The page cross
  1082. references in this report may not correspond to
  1083. the page numbers of your particular hard copy,
  1084. either because the calculation parameters were
  1085. improperly set or because of the printing
  1086. characteristics of your document.
  1087. PN2 :=Setting.dPN2
  1088.  Any valid margin setting, entered as text
  1089. ML :=Setting.dML
  1090. ,pgcl:=PR1
  1091.  Any valid margin setting, entered as text
  1092. MR :=Setting.dMR
  1093. @list(home
  1094.  Any valid print offset, entered as text
  1095. PO :=Setting.dPO
  1096. :=PR2)),
  1097.  Any valid width setting, entered as text
  1098. PW :=Setting.dPW
  1099.             @echo(#
  1100. dDPCX 
  1101. DPCX :=Setting.dDPCX
  1102.           pf:
  1103. MHX :=Setting.dMHX
  1104.  [R]egular/[Q]uick ; i.e. R/Q
  1105. MHO :=Setting.dMHO
  1106. (~(|(z(
  1107. n: ` " &SC
  1108. dHITMARK 
  1109.  Any valid word style setting
  1110. HITMARK :=Setting.dHITMARK
  1111. t(r(p(n(
  1112. p to assur
  1113. dBSPX 
  1114. BSPX :=Setting.dBSPX
  1115. h(f(d(b(
  1116. CTRL-HOME}
  1117. dBSPn 
  1118.  Any number 0 or greater, entered as text
  1119. BSPN :=Setting.dBSPn
  1120. \(Z(X(V(
  1121. alse),
  1122. dBPX 
  1123. BPX :=Setting.dBPX
  1124. P(N(L(J(
  1125. ,@list(@Cl
  1126. dBPn 
  1127.  Any number 1 or greater, entered as text
  1128. BPn :=Setting.dBPn
  1129. D(B(@(>(
  1130. true,@retu
  1131.  The number of screen lines per printed page
  1132. LP :=Setting.dLP
  1133. :(8(6(4(
  1134.          
  1135. dBATX 
  1136. BATX :=Setting.dBATX
  1137. 0(.(,(*(
  1138. usiness(@p
  1139. dBATT 
  1140.  FW/D ; desktop (FW) or disk (D)
  1141. BATT :=Setting.dBATT
  1142. RETURN}"),
  1143. dBATP 
  1144. BATP :=Setting.dBATP
  1145. :=@busines
  1146. dOTX 
  1147. OTX :=Setting.dOTX
  1148. dOTT 
  1149.  [T]ext; [F]ormula; [L]abel 
  1150. OTT :=Setting.dOTT
  1151. Display Key Settings :=Setting.dDX
  1152. '|'x'r'l'h'b'V'R'N'
  1153. Global Variables ; program controlled // DO NOT EDIT
  1154. BLOCKTS
  1155. COUNTOUT
  1156. absolute subframe #
  1157. OTEMPOO
  1158. Hits]
  1159. MEDTIM89
  1160. HOMEBAT
  1161. scldoc
  1162. SCLtest.txt 
  1163. HOMEG
  1164. files
  1165. CLtest.txt 
  1166. HOMET
  1167. , :`q
  1168. hard copy page
  1169. scldisp ; template for opening display of key settings
  1170.